package com.xgk.boot.module.core.controller.admin.truck.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import com.xgk.boot.module.core.dal.entity.user.AdminUserDO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;

import java.time.Instant;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 操作日志 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ApiLogRespVO  {

    @Schema(description = "日志ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @ExcelProperty("日志ID")
    private Long olId;

    @Schema(description = "关联订单编号", example = "ORD123456")
    @ExcelProperty("订单编号")
    private String orderCode;

    @Schema(description = "参考编号", example = "REF789012")
    @ExcelProperty("参考编号")
    private String referenceNo;

    @Schema(description = "状态码", example = "200")
    @ExcelProperty("状态码")
    private String statusCode;

    @Schema(description = "请求地址", example = "GET: https://api.example.com/endpoint")
    @ExcelProperty("请求地址")
    private String requestUrl;

    @Schema(description = "请求方法", example = "GET")
    @ExcelProperty("请求方法")
    private String method;

    @Schema(description = "请求头", example = "{\"Content-Type\":\"application/json\"}")
    @ExcelProperty("请求头")
    private String requestHeaders;

    @Schema(description = "请求体", example = "{\"param1\":\"value1\"}")
    @ExcelProperty("请求体")
    private String requestBody;

    @Schema(description = "响应体", example = "{\"data\":\"success\"}")
    @ExcelProperty("响应体")
    private String responseBody;

    @Schema(description = "错误信息", example = "Connection timeout")
    @ExcelProperty("错误信息")
    private String errorMsg;

    @Schema(description = "请求时间", example = "2023-09-22T10:30:00Z")
    @ExcelProperty("请求时间")
    private Instant requestTime;

    @Schema(description = "响应时间", example = "2023-09-22T10:30:01Z")
    @ExcelProperty("响应时间")
    private Instant responseTime;

    @Schema(description = "请求耗时(毫秒)", example = "1000")
    @ExcelProperty("耗时(ms)")
    private Long costTime;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private Instant createTime;

}
